﻿<Window x:Class="LevelEditor.View.Windows.SpriteSheetManagerWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:uc="clr-namespace:LevelEditor.View.UserControls"
        xmlns:px="clr-namespace:LevelEditor.Utils.ImageSnappingToPixels"
        xmlns:ut="clr-namespace:LevelEditor.Utils"
        Title="SpriteSheetManagerWindow" Height="640" Width="480"
        Icon="/LevelEditor;component/Assets/UI/ico_assetsmanager.png">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition ColumnDefinition.Width="170" />
            <ColumnDefinition ColumnDefinition.Width="5" />
            <ColumnDefinition ColumnDefinition.Width="*" />
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition RowDefinition.Height="170" />
                <RowDefinition RowDefinition.Height="5" />
                <RowDefinition RowDefinition.Height="*" />
            </Grid.RowDefinitions>
            <DockPanel Grid.Row="0" DockPanel.LastChildFill="True" FrameworkElement.HorizontalAlignment="Stretch" FrameworkElement.VerticalAlignment="Stretch" FrameworkElement.Height="Auto">
                <Grid FrameworkElement.Margin="0" DockPanel.Dock="Top">
                    <Rectangle FrameworkElement.Height="20" Shape.Fill="#FF2D2D2D" />
                    <Label Control.Foreground="#FFFFFFFF">
                        Preview
                    </Label>
                </Grid>
                <StackPanel FrameworkElement.HorizontalAlignment="Center" FrameworkElement.VerticalAlignment="Center">
                    <Border Name="previewImageBorder" DockPanel.Dock="Top" Border.BorderThickness="1,1,1,1" Border.BorderBrush="#FF565656">
                        <Image Name="previewImage" />
                    </Border>
                </StackPanel>
            </DockPanel>
            <GridSplitter Grid.Row="1" GridSplitter.ResizeBehavior="PreviousAndNext" FrameworkElement.Height="5" FrameworkElement.Width="Auto" />
            <DockPanel Grid.Row="2" DockPanel.LastChildFill="True" FrameworkElement.HorizontalAlignment="Stretch" FrameworkElement.VerticalAlignment="Stretch" FrameworkElement.Height="Auto">
                <Grid FrameworkElement.Margin="0" DockPanel.Dock="Top">
                    <Rectangle FrameworkElement.Height="20" Shape.Fill="#FF2D2D2D" />
                    <Label Control.Foreground="#FFFFFFFF">
                        List
                    </Label>
                </Grid>
                <Border DockPanel.Dock="Top" Border.BorderThickness="1" Border.BorderBrush="#FFEEEEEE" FrameworkElement.Margin="2">
                    <DockPanel DockPanel.LastChildFill="True" FrameworkElement.HorizontalAlignment="Stretch" FrameworkElement.Width="Auto">
                        <Border DockPanel.Dock="Right" FrameworkElement.Margin="0,4,2,0">
                            <px:Bitmap Source="/Assets/UI/ico_search.png" />
                        </Border>
                        <TextBox Name="SearchTB" DockPanel.Dock="Left" Control.BorderThickness="0" />
                    </DockPanel>
                </Border>
                <StackPanel FrameworkElement.Width="Auto" DockPanel.Dock="Bottom" StackPanel.Orientation="Horizontal" FrameworkElement.HorizontalAlignment="Right">
                    <Button Name="removeBtn" FrameworkElement.Margin="5,5,5,5" FrameworkElement.Width="75">
                        Remove
                    </Button>
                    <Button Name="createBtn" FrameworkElement.Margin="0,5,5,5" FrameworkElement.Width="75">
                        Create
                    </Button>
                </StackPanel>
                <ListBox Name="spriteSheetList" />
            </DockPanel>
        </Grid>
        <GridSplitter Grid.Column="1" GridSplitter.ResizeBehavior="PreviousAndNext" FrameworkElement.Height="Auto" FrameworkElement.Width="5" />
        <DockPanel Grid.Column="2" DockPanel.LastChildFill="True" FrameworkElement.HorizontalAlignment="Stretch" FrameworkElement.VerticalAlignment="Stretch">
            <Grid FrameworkElement.Margin="0" DockPanel.Dock="Top">
                <Rectangle FrameworkElement.Height="20" Shape.Fill="#FF2D2D2D" />
                <Label Control.Foreground="#FFFFFFFF">
                    Sprite Sheet Infos
                </Label>
            </Grid>
            <Grid DockPanel.Dock="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition ColumnDefinition.Width="100" />
                    <ColumnDefinition ColumnDefinition.Width="100" />
                    <ColumnDefinition ColumnDefinition.Width="100" />
                    <ColumnDefinition ColumnDefinition.Width="100" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Label Grid.Row="0" Grid.Column="0">
                    Name:
                </Label>
                <TextBox Name="name" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" FrameworkElement.Margin="1" />
                <Label Grid.Row="1" Grid.Column="0">
                    Frame Width:
                </Label>
                <Label Name="frameWidth" Grid.Row="1" Grid.Column="1" FrameworkElement.Margin="1" />
                <Label Grid.Row="2" Grid.Column="0">
                    Frame Height:
                </Label>
                <Label Name="frameHeight" Grid.Row="2" Grid.Column="1" FrameworkElement.Margin="1" />
                <Label Grid.Row="1" Grid.Column="2">
                    Frame Duration:
                </Label>
                <StackPanel Grid.Row="1" Grid.Column="3" StackPanel.Orientation="Horizontal">
                    <TextBox Name="frameDuration" FrameworkElement.Margin="1" FrameworkElement.Width="50" Text="33" />
                    <Label FrameworkElement.Width="50">
                        (ms)
                    </Label>
                </StackPanel>
            </Grid>
            <Grid FrameworkElement.Margin="0" DockPanel.Dock="Top">
                <Rectangle FrameworkElement.Height="20" Shape.Fill="#FF2D2D2D" />
                <Label Control.Foreground="#FFFFFFFF">
                    Assemble
                </Label>
            </Grid>
            <StackPanel FrameworkElement.Width="Auto" DockPanel.Dock="Bottom" StackPanel.Orientation="Horizontal" FrameworkElement.HorizontalAlignment="Right">
                <Button Name="saveBtn" FrameworkElement.Margin="5,5,5,5" FrameworkElement.Width="75">
                    Save
                </Button>
                <Button Name="addSpriteBtn" FrameworkElement.Margin="5,5,5,5" FrameworkElement.Width="75">
                    Add Sprite(s)
                </Button>
                <Button Name="closeBtn" FrameworkElement.Margin="0,5,5,5" FrameworkElement.Width="75">
                    Close
                </Button>
            </StackPanel>
            <WrapPanel Name="SpriteGrid" FrameworkElement.VerticalAlignment="Top" FrameworkElement.HorizontalAlignment="Stretch" />
        </DockPanel>
    </Grid>

</Window>
